package plugin.lombok;

import lombok.experimental.Delegate;

import java.util.List;

/**
 * 代理生成某些类的所有共有方法,excludes可以排除部分父类方法，types是用私有的内部接口的方法来生成的
 * Created by yangliwei on 2017/11/9.
 */
public class DelegateTest {
    private
    @Delegate(types = {})
    List<String> foo;


    public static void main(String[] args) {

    }

}


/**
 *当没有使用types参数和excludes参数时
    生成list类所有共有非静态函数
 public int size() {
 return this.foo.size();
 }

 public boolean isEmpty() {
 return this.foo.isEmpty();
 }

 public boolean contains(Object arg0) {
 return this.foo.contains(arg0);
 }

 public Iterator<String> iterator() {
 return this.foo.iterator();
 }

 public Object[] toArray() {
 return this.foo.toArray();
 }

 public <T> T[] toArray(T[] arg0) {
 return this.foo.toArray(arg0);
 }

 public boolean add(String arg0) {
 return this.foo.add(arg0);
 }

 public boolean remove(Object arg0) {
 return this.foo.remove(arg0);
 }

 public boolean containsAll(Collection<?> arg0) {
 return this.foo.containsAll(arg0);
 }

 public boolean addAll(Collection<? extends String> arg0) {
 return this.foo.addAll(arg0);
 }

 public boolean addAll(int arg0, Collection<? extends String> arg1) {
 return this.foo.addAll(arg0, arg1);
 }

 public boolean removeAll(Collection<?> arg0) {
 return this.foo.removeAll(arg0);
 }

 public boolean retainAll(Collection<?> arg0) {
 return this.foo.retainAll(arg0);
 }

 public void replaceAll(UnaryOperator<String> arg0) {
 this.foo.replaceAll(arg0);
 }

 public void sort(Comparator<? super String> arg0) {
 this.foo.sort(arg0);
 }

 public void clear() {
 this.foo.clear();
 }

 public String get(int arg0) {
 return (String)this.foo.get(arg0);
 }

 public String set(int arg0, String arg1) {
 return (String)this.foo.set(arg0, arg1);
 }

 public void add(int arg0, String arg1) {
 this.foo.add(arg0, arg1);
 }

 public String remove(int arg0) {
 return (String)this.foo.remove(arg0);
 }

 public int indexOf(Object arg0) {
 return this.foo.indexOf(arg0);
 }

 public int lastIndexOf(Object arg0) {
 return this.foo.lastIndexOf(arg0);
 }

 public ListIterator<String> listIterator() {
 return this.foo.listIterator();
 }

 public ListIterator<String> listIterator(int arg0) {
 return this.foo.listIterator(arg0);
 }

 public List<String> subList(int arg0, int arg1) {
 return this.foo.subList(arg0, arg1);
 }

 public Spliterator<String> spliterator() {
 return this.foo.spliterator();
 }

 */
